﻿using Common.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Database.Mappers
{
    public partial class Mapper
    {
        

        public CharacterDTO Map(Character character)
        {

            if (character == null)
                return null;

            return new CharacterDTO
            {
                Id = character.Id,
            };
        }

        public Character Map(CharacterDTO character,
                             ICollection<CharacterItem> characterItem = null,
                             ICollection<ActionLog> actionLog = null,
                             UserAccount userAccount = null)
        {
            if (character == null ||
                character.Id == null)
                return null;

            return new Character
            {
                Id = character.Id,
                CharacterItem = characterItem,
                ActionLog = actionLog,
                UserAccount = userAccount
            };
        }
    }
}
